package com.xzh.rocketmq.service;

import com.mall.common.util.JsonResult;
import com.mall.model.Product;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "product-api", contextId = "Product-feign")
public interface ProductFeignService {
    @GetMapping("/api/Products/id/{id}")
    ResponseEntity<JsonResult<Product>> findById(@PathVariable Integer id);

    //库存加1
    @PutMapping("/api/Products/qty/{ProductId}/1")
    ResponseEntity<JsonResult<?>> updateQty(@PathVariable Integer ProductId);
}
